Skip to content

🐛 Fix mypy strict mode compatibility#484

Open
sam-mosleh wants to merge 2 commits intoboxed:mainfrom
sam-mosleh:fix-strict-mypy
Open

🐛 Fix mypy strict mode compatibility#484
sam-mosleh wants to merge 2 commits intoboxed:mainfrom
sam-mosleh:fix-strict-mypy

Conversation

@sam-mosleh
Copy link
Contributor

Problem

When running mypy in strict mode, the following exception is raised:

Exception: Could not find mutant for type error .../__init__.py:10 (Unused "type: ignore" comment). Probably, a code mutation influenced types in unexpected locations. If your project normally has no type errors and uses mypy/pyrefly, please file an issue with steps to reproduce on github.

Changes

This PR adds a new e2e test that runs mypy in strict mode to catch this class of error early and prevent future regressions. Additionally, the Docker image has been restructured to separate dependency installation from test files — previously, dependencies were being rebuilt on every single run because test files were updated during each run, invalidating the layer cache; now dependencies are built once and subsequent runs simply execute the tests against the pre-built image.

@sam-mosleh
Copy link
Contributor Author

@Otto-AA Can I remove the space from tests/test_mutation regression.py filename ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant